package Entity;

import java.io.Serializable;
import javax.persistence.*;
import java.util.*;
@Entity
@Table (name = "Facturas")
public class FacturasEntity implements Serializable{

	private static final long serialVersionUID = 1L;
	
	@Id
	@Column (name = "idFacturas", nullable = false)
	private int id;
	
	@Column (name = "Fecha")
	private Date fecha;
	
	@Column (name = "Monto")
	private float monto;
	
	@Column (name = "Cobrado")
	private boolean cobrado;
	
	@ManyToOne
	@JoinColumn(name = "idMesa")
	private MesaEntity mesa;

	@OneToMany
	@JoinColumn(name = "idFactura")
	private List<ItemsFacturasEntity> itemfactusas;
	
	@OneToMany
	@JoinColumn (name = "idFactura")
	private List<FormaPagoEntity> formaPago = new ArrayList<FormaPagoEntity>();
}
